<?php
/**
 * An implementation of the Workflow_Visitor interface that
 * resets all the nodes of a workflow.
 *
 * This visitor should not be used directly but will be used by the
 * reset() method on the workflow.
 *
 * <code>
 * <?php
 * $workflow->reset();
 * ?>
 * </code>
 * @author dengdl
 *
 */
class Workflow_Visitor_Reset extends Workflow_Visitor
{
	/**
     * Perform the visit.
     *
     * @param Workflow_Visitable $visitable
     */
    protected function doVisit( Workflow_Visitable $visitable )
    {
        if ( $visitable instanceof Workflow_Node )
        {
            $visitable->initState();
        }
    }
}
?>